An electronic level reads a barcode to automatically determine a height of a measurement point by use of a bar-coded leveling rod as a graduation. With such an electronic level, there is a defect that the electronic level is easily affected by a disturbance, to be easily incapable of measurement due to, for example, a background of a leveling rod, or an obstacle between the leveling rod and the electronic level.
The applicant has filed an application for an electronic level which is hardly affected by a disturbance in order to solve the above-described defect (refer to the following Patent Document 1). First, this electronic level will be described.
As shown in FIG. 1, this electronic level 2 is for collimating a leveling rod 1, to measure a height h of a collimation position. A barcode in which black marks 11 are drawn on a white surface is indicated on the leveling rod 1. The leveling rod 1 is usually set in an upright state. However, in some cases, the leveling rod 1 may be set in an upside-down state in which the leveling rod 1 is vertically inverted, with a ceiling surface C as a reference as illustrated. In this case, a height h from the ceiling surface C to a collimation position is measured. The vertical width dimensions of the marks 11 are not all the same in dimension, and the marks 11 with several types of dimensions are arrayed in a predetermined order.
A barcode pattern is shown in FIG. 2. The marks 11 indicated on the leveling rod 1 are arrayed at regular pitches P. Given that the total length of the leveling rod 1 is 4 m and the pitch P is 16 mm, it is possible to indicate 249 marks 11 on the leveling rod 1. As the vertical width dimensions of the marks 11, six types of 3 mm, 4 mm, 7 mm, 8 mm, 11 mm, and 12 mm are used. The electronic level 2 is configured to determine the width dimensions of the marks 11, to correspond to six types of integers of 0, 1, 2, 3, 4, and 5 as shown by N in FIG. 2. Accordingly, a sequence created from the marks 11 is expressed by the six types of integers, and is, for example, the following sequence (1).
. . . 0, 5, 1, 2, 4, 0, 5, 3, 1, 0, 4, 3, 2, . . . (1)
Here, in the case where an arbitrary number of integers are retrieved from the sequence (1), to create a permutation, it is necessary for a permutation which is created by retrieving integers from one place to differ from a permutation which is created by retrieving integers from any other place. Further, it is necessary for a permutation which is obtained from the leveling rod 1 in an upside-down state to differ from any one of the permutations which are obtained when the leveling rod 1 is in an upright state. Then, the number of integers to be retrieved from the aforementioned sequence (1) is set to 5. For example, when five integers are retrieved from the left endpoint of the sequence (1), the following permutation (2) is obtained.
0, 5, 1, 2, 4 . . . (2)
However, in the case where five integers are retrieved, there is no need for these integers to be necessarily sequential. For example, in the case where the mark 11 corresponding to the third integer from the left is hidden by an obstacle or the like between the leveling rod 1 and the electronic level 2, the integer which is hidden to be unclear may be expressed as *, to obtain the following sequence.
0, 5, *, 2, 4, 0 . . . (3)
On the other hand, the electronic level 2 stores the same sequence as the above-described sequence (1) astable values, and determines which portion in the table values the retrieved permutation (2) or (3) corresponds to, to determine a height h of the collimation position from that position.
Further, when the leveling rod 1 is in an upside-down state, a permutation (4) of integers retrieved from a portion of the aforementioned permutation (2) is as follows.
4, 2, 1, 5, 0 . . . (4)
The permutation (4) is set so as not to correspond to any portion of the above-described sequence (1). Accordingly, because there is no corresponding portion when the leveling rod 1 is in an upside-down state, a microcomputer 3 is capable of judging that the leveling rod 1 is in an upside-down state, to indicate that effect, and inverts the order of the retrieved permutation (4), to compare the inverted permutation with the aforementioned sequence (1), thus being capable of determining the height h.
Meanwhile, a distance between the leveling rod 1 and the electronic level 2 is increased, the number of the marks 11 positioned within the visual field of a collimating optical system is increased. However, the image of the marks 11 is made smaller, which lowers the accuracy of discrimination of width dimensions. Then, when it is judged from the size of the image of the leveling rod 1 that the distance between the leveling rod 1 and the electronic level 2 exceeds a predetermined value by stadia, as shown by F in FIG. 2, 3 mm and 4 mm are discriminated as the same dimension, so as to correspond to 0, 7 mm and 8 mm are discriminated as the same dimension, so as to correspond to 1, and 11 mm and 12 mm are discriminated as the same dimension, so as to correspond to 2. In this way, the following sequence (5) expressed by three types of integers is obtained.
. . . 0, 2, 0, 1, 2, 0, 2, 1, 0, 0, 2, 1 . . . (5)
The electronic level 2 stores this sequence (5) in addition to the sequence (1). Meanwhile, when the types of integers composing the sequence (5) are three types in this way, it is necessary to increase the number of integers to be retrieved from five for reliable height measurement, and therefore, eight integers are to be retrieved.
For example, when eight integers are taken from the left endpoint of the sequence (5), the following permutation (6) is obtained.
0, 2, 0, 1, 2, 0, 2, 1 . . . (6)
Further, in the case where some (for example, two) marks 11 are hidden to be not discriminable, nonsequential eight integers may be retrieved, so as to form a permutation (7).
0, 2, 0, *, 2, 0, *, 1, 0, 0 . . . (7)
Then, which portion of the sequence (5) the permutation (6) or (7) corresponds to is determined, to determine a height h of the collimation position. Further, when the leveling rod 1 is in an upside-down state, the obtained permutation (6) or (7) is inverted, to determine a height h from the inverted permutation and the sequence (5).
Meanwhile, as shown in FIG. 3, an objective optical system (an objective lens and a focusing lens) 21 and a slope automatic compensation mechanism (compensator) 22 are provided inside the electron level 2, a light-received image of the leveling rod 1 is split into a line sensor 24 by a beam splitter 23. A collimating optical system is to pass through the beam splitter 23 and an image optical system is to be split into the line sensor 24.
The collimating optical system is composed of the objective optical system 21, the slope automatic compensation mechanism 22, the beam splitter 23, a focusing glass 20a, and an eye lens 20b. The image optical system is composed of the objective optical system 21, the slope automatic compensation mechanism 22, the beam splitter 23, and the line sensor 24. The line sensor 24 converts the light-received image of the leveling rod 1 into an electric signal, to output it to an amplifier 25. The signal amplified in the amplifier 25 is synchronized with a clock signal of a clock driver 26, to be sampled and held, to be converted into a digital signal in an A/D converter 27. The signal converted into the digital signal is stored in a RAM 28. The microcomputer 3 determines width dimensions of the respective marks 11 captured within the visual field of the collimating optical system based on the signal stored in the RAM 28, and determines a permutation of a predetermined number of integers from a predetermined number of marks 11 centering on the collimation point. For example, in the case of measurement within a predetermined distance, as shown in FIG. 4, a permutation composed of five integers is determined from the width dimensions of the N−2nd, N−1st, Nth, N+1st, and N+2nd marks 11. Then, the permutation is compared with the table values of the sequence (1) or (5) stored in advance in a ROM 31, to determine the height h of the collimation position. A drive circuit 29 is a circuit that controls the operation of the line sensor 24. Further, because the optical axis of the collimating optical system and the optical axis of the image optical system correspond to one another, the collimation point on the leveling rod 1 and the collimation point of the image optical system correspond to one another.
A measurement program performed by the microcomputer 3 in order to perform a height measurement with this electronic level 2 will be described by a flowchart of FIG. 5.
When a measurement program is started, the process proceeds to Step S1, to acquire an output signal from the line sensor 24. Next, the process proceeds to Step S2, to perform a frequency measurement with respect to the acquired output signal. Because the marks 11 are disposed at regular pitches B on the leveling rod 1, it is possible to detect a frequency component according to the array of the marks 11. Because the frequency is, specifically, the number of the marks 11 formed as an image on a predetermined number of pixels on the line sensor 24, provided that the predetermined number of pixels is divided by the number, it is possible to determine the pitch P of the marks 11 formed as the image on the line sensor 24 as a length in units of pixels. Next, the process proceeds to Step S3, and it is checked whether or not the frequency measurement is successful. When the frequency measurement fails, it is impossible to calculate a distance up to the leveling rod 1, and therefore, the process proceeds to Step S8, to indicate an error in distance measurement, and the measurement program is terminated.
As shown in FIG. 6, based on the predetermined pitch B of the marks 11 on the leveling rod 1, a focal point distance f of the objective lens, and the pitch P of the marks 11 formed as an image on the line sensor 24, which is determined from the frequency measurement, a distance D up to the leveling rod 1 is determined by the following formula.D=fB/P  (8)
When the frequency measurement is successful in Step S3, the process proceeds to Step S4, to perform a height measurement as described later. Next, it is checked whether or not the height measurement is successful. When the height measurement is successful, the process proceeds to Step S6, to indicate measured values of the height and distance, and the measurement program is terminated. When the height measurement fails, the process proceeds to Step S7, to indicate an error in height measurement, and the measurement program is terminated.
The height measurement in Step S4 will be described in more detail by FIGS. 7 and 8. From Step S3, the process proceeds to Step S41, to measure the width dimensions of the black marks 11. When the marks 11 are formed as an image on the line sensor 24 as shown in FIG. 8A, an output signal from the line sensor 24 changes into one as in FIG. 8B. Then, when the output signal from the line sensor 24 is differentiated, as shown in FIG. 8C, falling pulses and rising pulses are detected. Therefore, it is possible to detect the width dimensions of the respective marks 11 according to intervals w of the both pulses.
Next, the process proceeds to Step S42, to perform an encoding process of converting the widths of the respective marks 11 into integers (refer to FIG. 2). Next, the process proceeds to Step S43, to search a corresponding place between a permutation obtained by converting the widths of the respective marks 11 into integers and the sequence stored in advance. Next, the process proceeds to Step S44, to perform a height measurement when a corresponding place is found, and the process proceeds to the following Step S5. When a corresponding place is not found, the microcomputer 3 stores that the height measurement fails, and the process similarly proceeds to the following Step S5.
In accordance with the thus described leveling rod 1 and the electronic level 2, because the marks 11 are arrayed at regular pitches, and the width dimensions of the marks 11 are changed, to obtain a permutation of integers, it is possible to measure a height h even in the case where one of the marks 11 is hidden by an obstacle or the like, to be unable to be detected.
Further, in the case where the distance between the electronic level 2 and the leveling rod 1 is shorter than a predetermined distance, it is possible to reliably discriminate the width dimensions of all types of the marks 11. Therefore, it suffices that the number of the marks 11 to be retrieved in order to create a permutation of integers is small, which makes it possible to shorten the distance between the leveling rod 1 and the electronic level 2 by that amount.
Further, in the case where the distance between the leveling rod 1 and the electronic level 2 is longer than the predetermined distance, at least two types of the marks 11 whose width dimensions are approximate to each other are discriminated as the same dimension, to be expressed as the same integer, thereby lengthening a distance by which it is possible to discriminate the marks 11. In this case, the types of integers corresponding to the respective marks 11 are decreased, and the number of the marks 11 necessary for specifying a collimation position is increased. Meanwhile, in the case where the distance between the leveling rod 1 and the electronic level 2 is increased, the number of the marks 11 within the visual field of the collimating optical system is increased, and therefore, it is also possible to reliably perform a long distance measurement.
Moreover, because a permutation which is obtained by inverting a permutation retrieved from the respective marks 11 as well is to differ from a permutation retrieved from any position of the aforementioned sequence (1), there is no corresponding place in the aforementioned sequence (1) in a permutation obtained in the case where the leveling rod 1 is in an upside-down state, and therefore, it is possible to judge that the leveling rod 1 may be set in an upside-down state. Then, when there is a corresponding portion in an inverted permutation in which the retrieved permutation is inverted in the opposite direction, it is judged that the leveling rod 1 is inverted, and the height is measured.
As is clear from the above-described description, the electronic level 2 determines a permutation of integers based on the width dimensions of the marks 11, to determine a height of a collimation position, and is therefore hardly affected by a disturbance. Further, because the types of the integers composing a permutation are increased and decreased according to the length of the distance between the leveling rod 1 and the electronic level 2, it is possible to expand a measurable range between the leveling rod 1 and the electronic level 2.
Further, in the following Patent Document 2 as well, there is disclosed an electronic level and a leveling rod which are capable of expanding a measurable range. However, because there is little relationship with this invention, descriptions thereof will be omitted.